<%for activities in @activities.in_groups_of(3, false)%>
	<div class="row">
		<%for activity in activities%>
			<div class="col-md-4">
			<div class="panel panel-default">
				<div class="panel-heading">
					<h3 class="panel-title "><%=link_to activity.title, activity_join_path(activity)%>
						<small class="pull-right"><%=activity.end_time.to_date%>结束</small>
					</h3>
				</div>
				<div class="panel-body">
					<p><%=h activity.desc%></p>
				</div>
				<ul class="list-group">
					<%for product in activity.products.first(5)%>
						<li class="list-group-item">
							<%=h product.name%>
							<span class="badge"><%=h product.amount%></span>
						</li>
					<%end%>
				</ul>
			</div>
		</div>
<%end%>
	</div>
<%end%>
